package com.kaifamiao.service.imp;

import com.kaifamiao.mapper.PatientinfoMapper;
import com.kaifamiao.pojo.Patientinfo;
import com.kaifamiao.service.PatientinfoServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PatientService implements PatientinfoServices {
    @Autowired
    PatientinfoMapper mapper = null;
    @Override
    public List<Patientinfo> PatientinfofindAll() {
        List<Patientinfo> patientinfoList = mapper.findAll();
        System.out.println(patientinfoList);
        return patientinfoList;
    }

    @Override
    public Patientinfo selectpatientinfo(int id) {
        return mapper.selectPatientinfo(id);
    }

    @Override
    public int addpatientinfo(Patientinfo model) {
        int u;
        u=mapper.add(model);
        return u;
    }

    @Override
    public int updatepatientinfo(Patientinfo model) {
        int u;
        u=mapper.update(model);
        return u;
    }

    @Override
    public int deletepatientinfo(int id) {
        int u;
        u=mapper.delete(id);
        return u;
    }

    @Override
    public int selectPatientInfoCount() {
        return mapper.selectPatientInfoCount();
    }

}
